package com.example.springboot.controller;

import com.example.springboot.service.ReportNewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 报道新闻-控制层
 */
@RestController
public class ReportNewsController {
    @Autowired
    @Qualifier("reportNewsServiceImpl")
    private ReportNewsService reportNewsService;
    @GetMapping("/report-news")
    public String getReportNews() {
        return reportNewsService.report();
    }
    @Resource(name = "reportWorldCupNewsServiceImpl")
    private ReportNewsService reportWorldCupNewsService;
    @GetMapping("/report-world-cup-news")
    public String reportWorldCupNews(){
        return reportWorldCupNewsService.report();
    }
}